Word Counter Version 2.01A This program is really simple to use, and is generally self-explanatory. Before running this program, you should save two copies of the file you are working on: a copy to actually run Word Counter on (saved in Text format or printed to disk), and a backup just to be sure that the file is safe (an ordinary save, for instance). Be sure that you save the two files with DIFFERENT extensions. This program, when run, looks to the command line to see if there is a parameter there. If the parameter, which would be a directory list and filename up to 66 characters long, is found, then the program attempts to open the file. If the file is not found, the program states so, then terminates. If it is found, however, it goes through the entire file counting the words. This program determines if a set of characters is a word or not by looking to see if there is a space (Ascii character 32) after every non-space character. If it finds one, it counts it as a word. *** NOTE *** The program counts sets of characters without spaces in them as a single word. For instance: ThisIsASingleWord, While these are several words. Also, this program will tell you if there are no words in a file, which would mean that the file has a length of 0 bytes. This program is not perfect, but it definitely helps those people who own word processors that don't have a function to count the words in a text file (such as Microsoft Works for Dos). While this program is Public Domain, I claim all credit for this particular version. My claim of "Once Free, Always Free!" stands, always. This program is not to be sold or distributed for any amount of money, save for the cost of a diskette if this file is present on it. This program was written in Turbo Pascal Version 6. I have included the code for anyone who wishes to make a modification to it. My only request to any would-be modifiers is that you give me credit for the original version of the program in your supplemental documentation. *** NOTE *** I discovered, while using Word Counter Version 1.00, that there was often a very large difference in the number of words that Microsoft Word for Windows said I had and the number that Word Counter said. (Word for Windows reported more words.) I discovered that the problem was due to the size of the paragraphs I had written: Word Counter was only reading the first 256 characters, then skipping to the next carriage return. Being a writer, I immediately knew something was wrong with Word Counter. So with version 2.01, not only have I changed the visual effects of the program, but I have also redesigned the way Word Counter counts words. Now the program loads blocks of the text file into memory, counts the words in it, then loads another block of equal or smaller size (depending on the size of the file when Word Counter is near the end of it). Also, if Word Counter stops its execution, the screen will show what percentage of the file was counted prior to its termination. This program termination has generally been caused by files that are not text files. Also, be aware that files containing more than several thousand words tend to be listed as having more words than they really do. This is because the new way of counting the words counts every non- letter/number character as a separation point for a word. Therefore, "1)Another" is two words rather than one. Raymond C. Rodgers Raymond Rodgers P.O. Box 32100 Detroit, Michigan 48232-0100 CompuServe ID 72074,1731 Internet: 72074.1731@COMPUSERVE.COM *** Attention *** To all who would revise this document and/or modify this program, please notify me in one of the aforementioned ways, add a revision comment underneath the variable assignment "ver=", AND replace the following information in the documentation: Revision: 2.01A Compiled On: May 27, 1993 Compiled By: Raymond C. Rodgers Documentation Written: May 27, 1993 Documentation Updated: September 29, 1993 Documentation Improvements: Updated means of contacting me (Raymond Rodgers). Revision Improvements: Better Documentation.